let array = [10, 22, 11, 9, 7, 22, 45, 6, 22, 11];

let value = 22;
let fromIndex = 5;
console.log(array.indexOf(value));
// indexOf( searchElement [ , fromIndex ] ) 
console.log(array.indexOf(value, fromIndex));

console.log(array.lastIndexOf(value));
// lastIndexOf( searchElement [ , fromIndex ] ) 
console.log(array.lastIndexOf(value, fromIndex));